package sip

import (
	"fmt"
)

// Response Response
type Response struct {
	*Message
}

// AlarmResponseXML alarm response xml样式
var (
	AlarmResponseXML = `<?xml version="1.0"?>
<Response>
<CmdType>Alarm</CmdType>
<SN>17430</SN>
<DeviceID>%s</DeviceID>
</Response>
`
	NotifyResponseXML = `<?xml version="1.0"?>
<Response>
<CmdType>Alarm</CmdType>
<SN>17430</SN>
<DeviceID>%s</DeviceID>
<Result>%s</Result>
</Response>
`
	DeviceResponseXML = `<?xml version="1.0"?>
	<Response>
	<CmdType>DeviceInfo</CmdType>
	<SN>%d</SN>
	<DeviceID>%s</DeviceID>
	<Result>OK</Result>
	<DeviceName>%s</DeviceName>
	<Manufacturer>%s</Manufacturer>
	<Model>%s</Model>
	<Firmware>%s</Firmware>
	</Response>
	`
)

// BuildRecordInfoXML 获取录像文件列表指令
func BuildAlarmResponseXML(id string) string {
	return fmt.Sprintf(AlarmResponseXML, id)
}
